function make_p_index(List, title)


fid =fopen('index.html','w');
fprintf(fid,['<!DOCTYPE html  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">\n' ...
    '<html>   <head>            <title>' title  '</title>\n' ...
    '<style>\n' ...
    'body {\n' ...
    '  background-color: white;\n' ...
    ' margin:10px;\n' ...
    '}\n' ...
    'h1 {\n' ...
    ' color: #000000;\n' ...
    '  font-size: x-large;\n' ...
    '}\n' ...
    'h2 {\n' ...
    '  color: #000000;\n' ...
    '  font-size: medium;\n' ...
    '}\n' ...
    '/* Make the text shrink to fit narrow windows, but not stretch too far in wide windows. */\n' ...
    'p,h1,h2,div.content div {\n' ...
    ' max-width: 600px;\n' ...
    '  /* Hack for IE6 */\n' ...
    ' width: auto !important; width: 600px;\n' ...
    '}\n' ...
    'pre.codeinput {\n' ...
    '  background: #EEEEEE;\n' ...
    '  padding: 10px;\n' ...
    '}\n' ...
    '@media print {\n' ...
    ' pre.codeinput {word-wrap:break-word; width:100%%;}\n' ...
    '}\n' ...
    'span.keyword {color: #0000FF}\n' ...
    'span.comment {color: #228B22}\n' ...
    'span.string {color: #A020F0}\n' ...
    'span.untermstring {color: #B20000}\n' ...
    'span.syscmd {color: #B28C00}\n' ...
    '\n' ...
    'pre.codeoutput {\n' ...
    ' color: #666666;\n' ...
    ' padding: 10px;\n' ...
    '}\n' ...
    'pre.error {\n' ...
    '  color: red;\n' ...
    '}\n' ...
    '\n' ...
    'p.footer {\n' ...
    '  text-align: right;\n' ...
    '  font-size: xx-small;\n' ...
    '  font-weight: lighter;\n' ...
    '  font-style: italic;\n' ...
    '  color: gray;\n' ...
    '}\n' ...
    '</style></head>\n' ...
    '<body>\n' ...
    '<div class="content">\n' ...
    '<h1>' title '</h1>\n'] ...
    );
format compact
publishoptions.stylesheet ='C:\Documents and Settings\pkrysl\My Documents\SE121 Fall 2008 folder/mxdom2simplehtml.xsl';
fprintf(fid,['<ol>\n']);
for K_987k=1:length(List)
    publish(List{K_987k}, publishoptions);
    HTML =[List{K_987k}(1:end-2) '.html'];
    hfid=fopen(List{K_987k},'r');
    Title = fgets(hfid);
    fclose(hfid);
    fprintf(fid,['<li><a href="html/' HTML '">' Title(3:end) '</a> </li>\n']);
end
fprintf(fid,['</ol>\n']);
fclose(fid);